package com.lzh.lzhblog.controller;


import com.lzh.lzhframework.annotation.LogAnnotation;
import com.lzh.lzhframework.constants.LogType;
import com.lzh.lzhframework.domain.ResponseResult;
import com.lzh.lzhframework.domain.entity.FriendLink;
import com.lzh.lzhframework.service.FriendLinkService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author luzhiheng
 */
@RestController
@RequestMapping("/friendlink")
public class FriendLinkController {

    @Resource
    private FriendLinkService friendLinkService;

    @LogAnnotation(message = "查看友链", operation = LogType.QUERY)
    @GetMapping("/listAll")
    public ResponseResult listAll() {
        List<FriendLink> friendLinks = friendLinkService.queryList();
        return ResponseResult.success(friendLinks);
    }

}
